package com.itheima.score.service;

import com.itheima.score.entity.ResponseResult;
import com.itheima.score.pojo.User;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Name UserService
 * @Author BaiXin
 * @Date 2022-10-25 17:15
 */

public interface UserService {
    /**
     * 根据手机号查询用户
     * @param mobile
     * @return
     */
    ResponseResult findByMobile(String mobile);

    /**
     * 登录
     * @param user
     * @return
     */
    ResponseResult login(User user);

    /**
     * 查询所有
     * @return
     */
    ResponseResult findAll();

    /**
     * 根据classId查询
     * @param classId
     * @return
     */
    ResponseResult findByClassId(Integer classId);

    /**
     * 加分
     * @param user
     * @return
     */
    ResponseResult addIntegral(User user);
}
